package com.iplant.base.utils;


import com.iplant.base.utils.general.Configuration;
import com.iplant.base.utils.general.StringUtils;

public class BaseConfigConstans {

	public static final String DefaultPassword = Configuration.readConfigString("default.password",
			"config/config");
	public static final String AdminUser = Configuration.readConfigString("default.admin.user", "config/config");
	public static final String AdminPassword = Configuration.readConfigString("default.admin.password",
			"config/config");

	public static final String DefaultDBName = Configuration.readConfigString("db.name.default", "config/config");

	public static final String BasicDBName = Configuration.readConfigString("db.name.basic", "config/config");

	public static final String APSDBName = Configuration.readConfigString("db.name.aps", "config/config");

	public static final String MESDBName = Configuration.readConfigString("db.name.mes", "config/config");

	public static final String WMSDBName = Configuration.readConfigString("db.name.wms", "config/config");

	public static final String QMSDBName = Configuration.readConfigString("db.name.qms", "config/config");
	public static final String AMSDBName = Configuration.readConfigString("db.name.ams", "config/config");

	public static final String PDMDBName = Configuration.readConfigString("db.name.pdm", "config/config");

	public static final String ERPDBName = Configuration.readConfigString("db.name.erp", "config/config");

	public static final String TCMDBName = Configuration.readConfigString("db.name.tcm", "config/config");
	public static final String BPMDBName = Configuration.readConfigString("db.name.bpm", "config/config");

	public static final int MaxPageSize = StringUtils
			.parseInt(Configuration.readConfigString("page.size.max", "config/config"));

	public static final int DBServerType = StringUtils
			.parseInt(Configuration.readConfigString("db.server.sql.type", "config/config"));

	public static float UploadImageQuality = Configuration.readConfigFloat("upload.image.quality", "config/config");

	public static float UploadImageScale = Configuration.readConfigFloat("upload.image.scale", "config/config");


	/**
	 * 配置目录文件
	 */
	public static String ErrorLogConfigPath = Configuration.readConfigString("errorlog.catalog.path", "config/config");
	public static String ErrorLogPath = Configuration.readConfigString("errorlog.catalog", "config/config");

	
	/**
	 * 是否启用远程ftp上传
	 */
	public static int FTPUploadEnable = StringUtils
			.parseInt(Configuration.readConfigString("ftp.server.enable", "config/config"));






	static {

		if (UploadImageQuality <= 0)
			UploadImageQuality = 0.8f;

		if (UploadImageScale <= 0)
			UploadImageScale = 0.3f;




	}
}
